import BigFile from "@/views/BigFile";
import CateList from "@/views/Category/CateList";
import CatePublic from "@/views/Category/CatePublic";
import CourseEdit from "@/views/Course/CourseEdit";
import CourseList from "@/views/Course/CourseList";
import CoursePublic from "@/views/Course/CoursePublic";
import { DashBoard } from "@/views/DashBoard/DashBoard";
import Export from "@/views/Excel/ExcelExport";
import ExImport from "@/views/Excel/ExImport";
import RoleList from "@/views/Manager/Role";
import UserList from "@/views/Manager/User";
import Map from "@/views/Map";
import Setting from "@/views/Setting";
import Welcome from "@/views/Welcome";
import { AreaChartOutlined } from "@ant-design/icons";
// import type { MenuProps } from "antd";
// type MenuItem = Required<MenuProps>["items"][number];
import { IMenuProps } from "./inter";
export const mainRoutes: IMenuProps[] = [
  {
    key: "/",
    label: "欢迎页",
    title: "欢迎页",
    element: <Welcome />,
    hidden: true,
  },
  {
    key: "/dashboard",
    label: "数据统计",
    title: "数据统计",
    icon: <AreaChartOutlined />,
    element: <DashBoard />,
  },
  {
    key: "/course",
    label: "课程管理",
    title: "课程管理",
    icon: <AreaChartOutlined />,
    children: [
      {
        key: "/course/category",
        label: "分类列表",
        title: "分类列表",
        element: <CateList />,
      },
      {
        key: "/course/artlist",
        label: "图文课程",
        title: "图文课程",
        element: <CourseList />,
      },
      {
        key: "/course/artpub",
        label: "课程发布",
        title: "课程发布",
        element: <CoursePublic />,
        hidden: true,
      },
      {
        key: "/course/artedit",
        label: "课程编辑",
        title: "课程编辑",
        element: <CourseEdit />,
        hidden: true,
      },
    ],
  },
  {
    key: "/setting",
    label: "个人设置",
    title: "个人设置",
    icon: <AreaChartOutlined />,
    element: <Setting />,
  },
  {
    key: "/manager",
    label: "系统设置",
    title: "系统设置",
    icon: <AreaChartOutlined />,
    children: [
      {
        key: "/manager/role",
        label: "角色管理",
        title: "角色管理",
        element: <RoleList />,
      },
      {
        key: "/manager/user",
        label: "账号管理",
        title: "账号管理",
        element: <UserList />,
      },
    ],
  },
  {
    key: "/map",
    label: "高德地图",
    title: "高德地图",
    icon: <AreaChartOutlined />,
    element: <Map />,
  },
  {
    key: "/excel",
    label: "Excel表格",
    title: "Excel表格",
    icon: <AreaChartOutlined />,
    children: [
      {
        key: "/excel/export",
        label: "导出",
        title: "导出",
        element: <Export />,
      },
      {
        key: "/excel/import",
        label: "导入",
        title: "导入",
        element: <ExImport />,
      },
    ],
  },
  {
    key: "/bigfile",
    label: "大文件上传",
    title: "大文件上传",
    icon: <AreaChartOutlined />,
    element: <BigFile />,
  },
];
